import { useStore } from '@/store';

export function usePermissionHooks(pageName: string, handleName: string) {
  const store = useStore();
  const permissions = store.state.login.permissions;
  console.log('🚀 ~ usePermissionHooks ~ permissions:', permissions);
  const verifyPermission = `system:${pageName}:${handleName}`;
  return !!permissions.find((item) => item === verifyPermission);
}
